import React from "react";
import { Tree } from 'antd';
import { withRouter } from 'react-router-dom'
const TreeNode = Tree.TreeNode;
import './Trees.less';
class Trees extends React.Component {

    state = {
        data: [],
        loading: true
    }

    componentDidMount() {

    }


    onSelect = (value)=> {
        this.props.getId(value);
    }

    render(){

        return (
                <div className="trees">
                    <Tree showLine onSelect={this.onSelect} defaultExpandedKeys={['1']} defaultSelectedKeys={['2']}>
                        <TreeNode title="系统设置" key="1">
                            <TreeNode title="平台设置" key="2" />
                            <TreeNode title="行政区划设置" key="3" />
                            <TreeNode title="职能部门设置" key="4" />
                            <TreeNode title="养护公司及人员设置" key="5" />
                            <TreeNode title="问题分类设置" key="6" />
                            <TreeNode title="数据备份设置" key="7" />
                            <TreeNode title="安全设置" key="8" />
                        </TreeNode>
                    </Tree>
                </div>

        )
    }

}

export default withRouter(Trees);